package com.exartisan.datamanager;

import java.util.ArrayList;

import com.exartisan.bean.Data;

public class UserDataManager {
	
	private static UserDataManager singletonManager;
	
	private String userID;
	private ArrayList<Data> userData;
	
	private UserDataManager(){
		userData = new ArrayList<Data>();
	}
	
	/**
	 * Singleton pattern's method to get the unique instance of the class 
	 * which has declared for whole application. It's just like a global object.
	 * @return the singleton object of surveyLibrary
	 */
	public static synchronized UserDataManager getInstance(){
		if(singletonManager==null){
			singletonManager = new UserDataManager();
		}
		return singletonManager;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#clone()
	 */
	public Object clone() throws CloneNotSupportedException{
		throw new CloneNotSupportedException();
	}

	public String getUserID() {
		return userID;
	}

	public void setUserID(String userID) {
		this.userID = userID;
	}

	public ArrayList<Data> getUserData() {
		return userData;
	}

	public void setUserData(ArrayList<Data> userData) {
		this.userData = userData;
	}
}
